package F.Demo;


import java.util.Vector;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Administrator
 */
public class VectorDemo {
    
    
    public static void main(String[]args){
        Vector v = new Vector();
        for (int i = 1;i<=10;i++){
            v.add("第"+i+"个小孩");
        }
        System.out.println(v);
        for(;;){
            if(v.size()==2) break;
            for(int k=0; k<2; k++){
                v.add(v.get(0));
                v.remove(0);
                
                System.out.print("当前容器的内容是");
                System.out.println(v);
            }
            v.remove(0);
        }
        System.out.println("最后容器的内容:");
        System.out.println(v);
    }

}
